home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / pbc32.zip / BLDLIB.BAT < prev    next >
DOS Batch File  |  1996-04-10  |  5KB  |  152 lines

  1. @echo off
  2. echo off
  3. if %1==Q goto MakeQB
  4. if %1==P goto MakePDS
  5. if %1==V goto MakeVB
  6.  
  7. :Intro
  8. cls
  9. echo BLDLIB creates a complete PBCLONE.LIB (and .QLB) for you. It needs
  10. echo one parameter, to specify the target compiler:
  11. echo   Q   for QuickBasic
  12. echo   P   for PDS ("The BASIC Professional Development System")
  13. echo   V   for Visual Basic for DOS
  14. echo.
  15. echo For this to work:
  16. echo   1) BC.EXE, LINK.EXE, and LIB.EXE must be somewhere along your PATH
  17. echo   2) The BC support libraries must be somewhere along your LIB
  18. echo   3) The .BAS files from PBC23C.ZIP must be in the BAS subdir off
  19. echo      the current path (for example, if you're now in C:\PBCLONE,
  20. echo      the .BAS files should be in C:\PBCLONE\BAS).
  21. echo.
  22. echo The LibWiz utility, available separately, makes it easy to make
  23. echo subset PBClone libraries and .QLBs. You can also follow the
  24. echo instructions in PBCLONE.DOC to create libraries manually.
  25. echo.
  26. echo Example:
  27. echo   BLDLIB Q
  28. echo (this creates a PBCLONE.LIB for QuickBasic 4.x)
  29. goto Done
  30.  
  31. :MakeQB
  32. if not exist BAS\ALTKEY.BAS goto ErrNoBAS
  33. cd bas
  34. echo Compiling... this may take a while... hang on!
  35. del *.obj >nul
  36. for %x in (*.bas) do bc %x/o; >nul
  37. del pbc$bas.lib >nul
  38. if not exist ALTKEY.OBJ goto ErrNoOBJ
  39. echo Creating PBC$BAS library. This *will* take a while. Patience!
  40. for %x in (*.obj) do lib PBC$BAS+%x; >nul
  41. if not exist PBC$BAS.LIB goto ErrNoTmpLIB
  42. del *.obj >nul
  43. cd ..
  44. echo Creating final PBCLONE.LIB library. We're almost there...
  45. del pbclone.lib >nul
  46. lib pbclone.lib+pbc$main.lib+pbc$near.lib+bas\pbc$bas.lib; >nul
  47. echo PBCLONE.LIB contains the complete PBClone link library.
  48. echo Building .QLB library...
  49. link pbclone.lib/q/se:2048,pbclone.qlb,nul,BQLB45; >nul
  50. if not exist PBCLONE.QLB goto ErrNoQLB45
  51. echo PBCLONE.QLB contains the complete PBClone quick library.
  52. echo You're set to go!
  53. goto Done
  54.  
  55. :MakePDS
  56. if not exist BAS\ALTKEY.BAS goto ErrNoBAS
  57. cd bas
  58. echo Compiling... this may take a while... hang on!
  59. del *.obj >nul
  60. for %x in (*.bas) do bc %x/o; >nul
  61. del pbc$bas.lib >nul
  62. if not exist ALTKEY.OBJ goto ErrNoOBJ
  63. echo Creating PBC$BAS library. This *will* take a while. Patience!
  64. for %x in (*.obj) do lib PBC$BAS+%x; >nul
  65. if not exist PBC$BAS.LIB goto ErrNoTmpLIB
  66. del *.obj >nul
  67. cd ..
  68. echo Creating near string PBCLONE.LIB library. Nearly half done...
  69. del pbclone.lib >nul
  70. lib pbclone.lib+pbc$main.lib+pbc$near.lib+bas\pbc$bas.lib; >nul
  71. echo PBCLONE.LIB contains the complete near string PBClone link library.
  72. cd bas
  73. echo Compiling again... this may take a while... hang on!
  74. del *.obj >nul
  75. for %x in (*.bas) do bc %x/o/fs; >nul
  76. del pbc$bas.lib >nul
  77. echo Creating PBC$BASF library. This *will* take a while. Patience!
  78. for %x in (*.obj) do lib PBC$BASF+%x; >nul
  79. del *.obj >nul
  80. cd ..
  81. echo Creating far string PBCLONEF.LIB library. Almost done...
  82. del pbclonef.lib >nul
  83. lib pbclonef.lib+pbc$main.lib+pbc$far.lib+bas\pbc$basf.lib; >nul
  84. echo PBCLONEF.LIB contains the complete far string PBClone link library.
  85. echo Building .QLB library...
  86. link pbclonef.lib/q/se:2048,pbclonef.qlb,nul,QBXQLB; >nul
  87. if not exist PBCLONEF.QLB goto ErrNoQLB
  88. echo PBCLONEF.QLB contains the complete PBClone quick library.
  89. echo You're set to go!
  90. goto Done
  91.  
  92. :MakeVB
  93. if not exist BAS\ALTKEY.BAS goto ErrNoBAS
  94. cd bas
  95. echo Compiling... this may take a while... hang on!
  96. del *.obj >nul
  97. for %x in (*.bas) do bc %x/o; >nul
  98. del pbc$bas.lib >nul
  99. if not exist ALTKEY.OBJ goto ErrNoOBJ
  100. echo Creating PBC$BAS library. This *will* take a while. Patience!
  101. for %x in (*.obj) do lib PBC$BAS+%x; >nul
  102. if not exist PBC$BAS.LIB goto ErrNoTmpLIB
  103. del *.obj >nul
  104. cd ..
  105. echo Creating final PBCLONE.LIB library. We're almost there...
  106. del pbclone.lib >nul
  107. lib pbclone.lib+pbc$main.lib+pbc$near.lib+bas\pbc$bas.lib; >nul
  108. echo PBCLONE.LIB contains the complete PBClone link library.
  109. echo Building .QLB library...
  110. link pbclone.lib/q/se:2048,pbclone.qlb,nul,VBDOSQLB; >nul
  111. if not exist PBCLONE.QLB goto ErrNoQLB
  112. echo PBCLONE.QLB contains the complete PBClone quick library.
  113. echo You're set to go!
  114. goto Done
  115.  
  116. :ErrNoBAS
  117. echo Didn't find the .BAS files. Looks like they aren't in the BAS
  118. echo directory as required. Let's check the instructions again...
  119. echo.
  120. goto Intro
  121.  
  122. :ErrNoOBJ
  123. echo The .OBJ files weren't created. Looks like BC.EXE wasn't in
  124. echo the PATH as required. Let's check the instructions again...
  125. echo.
  126. cd ..
  127. goto Intro
  128.  
  129. :ErrNoTmpLIB
  130. echo The PBC$BAS.LIB library wasn't created. Looks like LIB.EXE
  131. echo wasn't in the PATH as required. Let's check the instructions
  132. echo again...
  133. echo.
  134. cd ..
  135. goto Intro
  136.  
  137. :ErrNoQLB45
  138. echo The PBCLONE.QLB quick library wasn't created. Either you have
  139. echo an old version (or no version) of LINK.EXE in your PATH, or
  140. echo you are using a version of QuickBasic before QB 4.5. In the
  141. echo latter case, create the .QLB manually, as described in the
  142. echo LIBRARY.TXT document. Otherwise, put the current LINK.EXE in
  143. echo your PATH and try it again.
  144. goto Done
  145.  
  146. :ErrNoQLB
  147. echo The PBCLONE.QLB quick library wasn't created. Probably you have
  148. echo an old version (or no version) of LINK.EXE in your PATH...
  149. goto Done
  150.  
  151. :Done
  152.